const comfig = require('./webpack.com.conf');
const webpackMerge = require('webpack-merge');
const webpack = require('webpack');
const config = require('../config');
const ExtractPlugin = require('extract-text-webpack-plugin');
const clean = require('clean-webpack-plugin');

let fillconfig = {
    mode:'production',
    module:{
        rules:[
            {
                test:/\.scss$/,
                use:ExtractPlugin.extract({
                    fallback:'style-loader',
                    use:['css-loader','sass-loader']
                })
            },
        ]
    },
    plugins:[
        new clean(),
        new ExtractPlugin({
            filename:'index.css'
        }),
    ],
    devtool:'none'
}

module.exports = webpackMerge(fillconfig,comfig)